package src.E_Thread;

// 线程休眠
public class E09_ThreadSleep implements Runnable{
    @Override
    public void run() {
        for (int i = 5; i > 0; i--) {
            try {
                Thread.sleep(1000); // 做一个倒计时
                System.out.println(i);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }

    public static void main(String[] args) {
        new Thread(new E09_ThreadSleep()).start();
    }
}
